package com.yzmoney.wechat.action;

/**
 * 公众平台菜单
 */

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.yzmoney.common.constant.Constants;
import com.yzmoney.wechat.service.WechatMenuService;

@Controller
@RequestMapping(value = "/wechat")
public class WechatMenuAction {
    private static Logger logger = Logger.getLogger(WechatMenuAction.class);
    @Autowired
    private WechatMenuService wechatMenuService;

    @RequestMapping(value = "/createMenu")
    public String creatMenu(HttpServletRequest request, HttpServletResponse response) {
    	String type=request.getParameter("type");
        wechatMenuService.createMenu(type);
        logger.info(Constants.LOGPRIFIX +type+ "createMenu");
        return "/wechat/menu";
    }

}
